<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="824.41">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica; min-height: 22.0px}
    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
    p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
    p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
    p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
    p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
    p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
    span.s1 {color: #0000bf}
    span.s2 {color: #000000}
    span.s3 {color: #007300}
    span.Apple-tab-span {white-space:pre}
  </style>
</head>
<body>
<p class="p1">//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, http://www.informatics.sussex.ac.uk/users/nc81/</p>
<p class="p2"><b></b><br></p>
<p class="p3"><b>EnvDetect<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>Envelope Follower Filter</b></p>
<p class="p2"><b></b><br></p>
<p class="p4"><b>EnvDetect.ar(in, attack,<span class="Apple-converted-space">  </span>release)</b></p>
<p class="p5"><br></p>
<p class="p4">Code adapted from musicdsp.org for a simple envelope tracking filter.<span class="Apple-converted-space"> </span></p>
<p class="p5"><br></p>
<p class="p4"><b>in</b>- input</p>
<p class="p4"><b>attack</b>- attack time in seconds</p>
<p class="p4"><b>release</b>- relase time in seconds<span class="Apple-converted-space"> </span></p>
<p class="p5"><br></p>
<p class="p6"><br></p>
<p class="p7">(</p>
<p class="p8"><span class="s1">SynthDef</span><span class="s2">(</span>"help-EnvDetect"<span class="s2">,{</span><span class="s1">Out</span><span class="s2">.ar(0,</span><span class="s1">Pan2</span><span class="s2">.ar(</span></p>
<p class="p7"><span class="s1">SinOsc</span>.ar(440,0,0.3*<span class="s1">EnvDetect</span>.ar(<span class="s1">LFNoise1</span>.ar(20), <span class="s1">MouseX</span>.kr(0.001,0.1,<span class="s3">'exponential'</span>), <span class="s1">MouseY</span>.kr(0.001,0.1,<span class="s3">'exponential'</span>)))<span class="Apple-converted-space"> </span></p>
<p class="p7">,0.0))</p>
<p class="p7">}).play</p>
<p class="p7">)</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p7">(</p>
<p class="p8"><span class="s1">SynthDef</span><span class="s2">(</span>"help-EnvDetect"<span class="s2">,{</span><span class="s1">Out</span><span class="s2">.ar(0,</span><span class="s1">Pan2</span><span class="s2">.ar(</span></p>
<p class="p7"><span class="s1">LFSaw</span>.ar(<span class="s1">EnvDetect</span>.ar(<span class="s1">LFNoise1</span>.ar(11,100,200), <span class="s1">MouseX</span>.kr(2,0.0001,<span class="s3">'exponential'</span>), <span class="s1">MouseY</span>.kr(2,0.0001,<span class="s3">'exponential'</span>)),0,0.3*<span class="s1">EnvDetect</span>.ar(<span class="s1">LFSaw</span>.ar(7), <span class="s1">MouseX</span>.kr(0.001,1,<span class="s3">'exponential'</span>), <span class="s1">MouseY</span>.kr(0.001,1,<span class="s3">'exponential'</span>)))<span class="Apple-converted-space"> </span></p>
<p class="p7">,0.0))</p>
<p class="p7">}).play</p>
<p class="p7">)</p>
<p class="p6"><br></p>
</body>
</html>
